#include<iostream>
using namespace std;

int a[30] = { 0 };
int Func(int i)
{
	if (i == 1 || i == 2)
	{
		return 1;
	}
	if (a[i])
	{
		return a[i];
	}
	a[i] = Func(i - 1) + Func(i - 2);
	return a[i];
}

int main()
{
	int n;
	int a[30]={ 0 };
	cin >> n;
	while (n--)
	{
		int x;
		cin >> x;
		cout << Func(x) << endl;
	}
	return 0;
}